<?php

namespace App\Http\Middleware;

use Closure;

class AdminsessionMiddleware
{
    /**
     *  判断是否登录，未登录返回登录页
     */
    public function handle($request, Closure $next)
    {
        if (session('adminid')) {
            return $next($request);
        }else{
            return redirect('/admin');
        }
        
    }
}
